package com.waijiaojun.tpo.service;

import com.waijiaojun.tpo.entity.Vocabulary;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
import com.waijiaojun.tpo.entity.SentencePattern;
import com.waijiaojun.tpo.repository.SentencePatternDao;

@Service
public class SentencePatternService{

    @Resource
    private SentencePatternDao sentencePatternDao;

    public int insert(SentencePattern pojo){
        return sentencePatternDao.insert(pojo);
    }

    public int insertSelective(SentencePattern pojo){
        return sentencePatternDao.insertSelective(pojo);
    }

    public int insertList(List<SentencePattern> pojos){
        return sentencePatternDao.insertList(pojos);
    }

    public int update(SentencePattern pojo){
        return sentencePatternDao.update(pojo);
    }

    public List<SentencePattern> findByArticleId(Long articleId) {
        return sentencePatternDao.findByScenarioId(articleId);
    }

    public void add(SentencePattern sentencePattern) {
        sentencePatternDao.insertSelective(sentencePattern);
    }

    public void delete(Long id) {
        sentencePatternDao.delete(id);
    }
}
